package
{
	import flash.filesystem.*; 
	import flash.system.Capabilities;
	import flash.desktop.NativeApplication;
	import flash.display.*;

	dynamic class FirstRun
	{
		public function FirstRun()
		{
			var file:File = File.applicationStorageDirectory.resolvePath("firstrun9"); 
				
			if(!file.exists)
			{
				var fs:FileStream = new FileStream();
				fs.open(file, FileMode.WRITE);
				fs.close();

				var options:NativeWindowInitOptions = new NativeWindowInitOptions();
				options.systemChrome = NativeWindowSystemChrome.NONE;
				options.type = NativeWindowType.LIGHTWEIGHT;
				options.transparent = true;
				options.maximizable = false;
				options.resizable = false;
				
				//todo = new NativeApplication();
				
				var win:NativeWindow = new NativeWindow(options);
				win.width = 421;
				win.height = 136;
				win.stage.scaleMode = "noScale";

				win.stage.align = StageAlign.TOP_LEFT;
				
				settings = new Settings_mc(true);
				
				win.stage.addChild(settings);
				win.x = (Capabilities.screenResolutionX - win.width) / 2;
				win.y = (Capabilities.screenResolutionY - win.height) / 2;		
				win.activate();

				var tasks:Tasks = new Tasks();
				tasks.patch();
			}
		}
		
		
	}
}